package xuhaijia.lanou3g.autohome.recommend;
//                .-~~~~~~~~~-._       _.-~~~~~~~~~-.
//            __.'              ~.   .~              `.__
//          .'//                  \./                   \\`.
//        .'//            为什么坚持  想一想当初             \\`.
//      .'// .-~"""""""~~~~-._     |     _,-~~~~"""""""~-.  \\`.
//    .'//.-"                 `-.  |  .-'                 "-. \\`.
//  .'//______.============-..   \ | /   ..-============._______\\`.
//.'//____________________________\|/_____________________________\\`.
// 
//                             

import android.graphics.Color;
import android.support.design.widget.TabLayout;
import android.support.v4.view.ViewPager;
import android.support.v4.widget.DrawerLayout;
import android.widget.RelativeLayout;

import xuhaijia.lanou3g.autohome.R;
import xuhaijia.lanou3g.autohome.base.BaseFragment;
import xuhaijia.lanou3g.autohome.forum.PrimaryAdapter;

/**
 * Created by dllo on 16/8/15.
 */
public class RecommendFragment extends BaseFragment {


    private ViewPager primaryVp;
    private TabLayout primaryTb;
    private RecommendAdapater recommendAdapater;
    public DrawerLayout drawerLayout;
    private RelativeLayout rightMenuLayout;

    @Override
    protected int setLayout() {
        return R.layout.fragment_primary;
    }

    @Override
    protected void initView() {
        recommendAdapater = new RecommendAdapater(getChildFragmentManager());
        primaryVp = bindView(R.id.primary_vp);
        primaryTb = bindView(R.id.primary_tb);
        rightMenuLayout = bindView(R.id.main_right_drawer_layout);
        drawerLayout = bindView(R.id.main_drawer_layout);
        drawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
    }

    @Override
    protected void initData() {
        primaryVp.setAdapter(recommendAdapater);
        primaryTb.setupWithViewPager(primaryVp);
        primaryTb.setTabTextColors(Color.BLACK,Color.BLUE);
        primaryTb.setSelectedTabIndicatorColor(Color.BLUE);

    }

    @Override
    public void load() {

    }

    @Override
    public void refresh() {

    }
}
